package org.shangrila.bme.eo;

import java.io.Serializable;
import javax.persistence.*;
import java.util.List;


/**
 * The persistent class for the bme_supplier database table.
 * 
 */
@Entity
@Table(name="bme_supplier")
@NamedQuery(name="BmeSupplier.findAll", query="SELECT b FROM BmeSupplier b")
public class BmeSupplier implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	private String id;

	private String address;

	private String city;

	private String contactor;

	private String name;

	private String phone;

	private String remarks;

	private String operator;
		
	//bi-directional many-to-one association to BmePurchOrder
	@OneToMany(mappedBy="bmeSupplier")
	private List<BmePurchOrder> bmePurchOrders;

	public BmeSupplier() {
	}

	public String getId() {
		return this.id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getAddress() {
		return this.address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getCity() {
		return this.city;
	}

	public void setCity(String city) {
		this.city = city;
	}

	public String getContactor() {
		return this.contactor;
	}

	public void setContactor(String contactor) {
		this.contactor = contactor;
	}

	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getPhone() {
		return this.phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getRemarks() {
		return this.remarks;
	}

	public void setRemarks(String remarks) {
		this.remarks = remarks;
	}

	public List<BmePurchOrder> getBmePurchOrders() {
		return this.bmePurchOrders;
	}

	public void setBmePurchOrders(List<BmePurchOrder> bmePurchOrders) {
		this.bmePurchOrders = bmePurchOrders;
	}

	public BmePurchOrder addBmePurchOrder(BmePurchOrder bmePurchOrder) {
		getBmePurchOrders().add(bmePurchOrder);
		bmePurchOrder.setBmeSupplier(this);

		return bmePurchOrder;
	}

	public BmePurchOrder removeBmePurchOrder(BmePurchOrder bmePurchOrder) {
		getBmePurchOrders().remove(bmePurchOrder);
		bmePurchOrder.setBmeSupplier(null);

		return bmePurchOrder;
	}

	public String getOperator() {
		return operator;
	}

	public void setOperator(String operator) {
		this.operator = operator;
	}

}